using System;
using System.Collections.Generic;
using System.Text;
using Dapper.Contrib.Extensions;
using Publicuse.Entity.AttributeUtil;
using SqlSugar;

namespace Publicuse.Entity
{
  /// <summary>
  /// 日志管理
  /// </summary>
  [DBTable("`geeker-roleresource`", "日志信息")]
  [Table("`geeker-roleresource`")]
  [SugarTable("`geeker-roleresource`")]
  public class RoleResource : BaseModel<long>
  {
    [Remark("角色编号")]
    public long rId { get; set; }

    [Remark("资源编号")]
    public string aIds { get; set; }

    [NoInsert]
    [Write(false)]
    [SugarColumn(IsIgnore = true)]
    public string rname { get; set; }

    [NoInsert]
    [Write(false)]
    [SugarColumn(IsIgnore = true)]
    public string aname { get; set; }

    public RoleResource()
    {
      this.Id = 0;
    }
  }

  /// <summary>
  /// 角色权限查询参数
  /// </summary>
  public class RoleResouceQuery : CommonQuery
  {
    public int urId { get; set; }

    public string aName { get; set; }

    public string rName { get; set; }

    public RoleResouceQuery()
    {
      this.exportName = GetExportName;
    }

    public static string GetExportName
    {
      get { return "roleresouce"; }
    }
  }
}
